const http = uni.$u.http

// api地址
const api = {
  login: 'passport/login',
  loginMpWx: 'passport/loginMpWx',
  loginMpWxMobile:'/api/miniapp/user.php?act=get_phone_number',
}

// 用户登录(手机号+验证码)
export const login = (params, config) => http.post(api.login, params, {
	custom: {
		toast: true
	},
	
	...config
})

// 微信小程序快捷登录(获取微信用户基本信息)
export const loginMpWx = (params, config) => http.post(api.loginMpWx, params, {
	custom: {
		toast: true
	},
	
	...config
})

// 微信小程序快捷登录(授权手机号)
export const loginMpWxMobile = (params, config) => http.post(api.loginMpWxMobile, params, {
	custom: {
		toast: true
	},
	
	...config
})
